package com.example.springboot.config.mysql;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 主数据库的配置
 *
 * @Author:ChenZhangKun
 * @Date: 2020/11/1 16:08
 */
@Component
@ConfigurationProperties(prefix = "master.db")
@Data
@PropertySource("classpath:db.properties")
public class MasterDataSourceConfig {
    @Value("${master.db.url}")
    private String url;
    @Value("${master.db.username}")
    private String username;
    @Value("${master.db.password}")
    private String password;
    @Value("${master.db.driverClassName}")
    private String driverClassName;
}
